package org.gr.ias.common.entity;

import java.io.Serializable;

public class Cif implements Serializable {
    /** id*/
    private String id;

    /** 姓名*/
    private String cifName;

    /** 性别(M:男、F:女)*/
    private String sex;

    /** 证件类型(00:身份证)*/
    private String idType;

    /** 证件号码*/
    private String idNum;

    /** 半身照片*/
    private String halfPhoto;

    /** 身份正面照*/
    private String identityPhotosFornt;

    /** 身份正反面*/
    private String identityPhotosRear;

    /** 手持身份证*/
    private String identityPhotosHold;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getCifName() {
        return cifName;
    }

    public void setCifName(String cifName) {
        this.cifName = cifName == null ? null : cifName.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType == null ? null : idType.trim();
    }

    public String getIdNum() {
        return idNum;
    }

    public void setIdNum(String idNum) {
        this.idNum = idNum == null ? null : idNum.trim();
    }

    public String getHalfPhoto() {
        return halfPhoto;
    }

    public void setHalfPhoto(String halfPhoto) {
        this.halfPhoto = halfPhoto == null ? null : halfPhoto.trim();
    }

    public String getIdentityPhotosFornt() {
        return identityPhotosFornt;
    }

    public void setIdentityPhotosFornt(String identityPhotosFornt) {
        this.identityPhotosFornt = identityPhotosFornt == null ? null : identityPhotosFornt.trim();
    }

    public String getIdentityPhotosRear() {
        return identityPhotosRear;
    }

    public void setIdentityPhotosRear(String identityPhotosRear) {
        this.identityPhotosRear = identityPhotosRear == null ? null : identityPhotosRear.trim();
    }

    public String getIdentityPhotosHold() {
        return identityPhotosHold;
    }

    public void setIdentityPhotosHold(String identityPhotosHold) {
        this.identityPhotosHold = identityPhotosHold == null ? null : identityPhotosHold.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Cif other = (Cif) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCifName() == null ? other.getCifName() == null : this.getCifName().equals(other.getCifName()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getIdType() == null ? other.getIdType() == null : this.getIdType().equals(other.getIdType()))
            && (this.getIdNum() == null ? other.getIdNum() == null : this.getIdNum().equals(other.getIdNum()))
            && (this.getHalfPhoto() == null ? other.getHalfPhoto() == null : this.getHalfPhoto().equals(other.getHalfPhoto()))
            && (this.getIdentityPhotosFornt() == null ? other.getIdentityPhotosFornt() == null : this.getIdentityPhotosFornt().equals(other.getIdentityPhotosFornt()))
            && (this.getIdentityPhotosRear() == null ? other.getIdentityPhotosRear() == null : this.getIdentityPhotosRear().equals(other.getIdentityPhotosRear()))
            && (this.getIdentityPhotosHold() == null ? other.getIdentityPhotosHold() == null : this.getIdentityPhotosHold().equals(other.getIdentityPhotosHold()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCifName() == null) ? 0 : getCifName().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getIdType() == null) ? 0 : getIdType().hashCode());
        result = prime * result + ((getIdNum() == null) ? 0 : getIdNum().hashCode());
        result = prime * result + ((getHalfPhoto() == null) ? 0 : getHalfPhoto().hashCode());
        result = prime * result + ((getIdentityPhotosFornt() == null) ? 0 : getIdentityPhotosFornt().hashCode());
        result = prime * result + ((getIdentityPhotosRear() == null) ? 0 : getIdentityPhotosRear().hashCode());
        result = prime * result + ((getIdentityPhotosHold() == null) ? 0 : getIdentityPhotosHold().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cifName=").append(cifName);
        sb.append(", sex=").append(sex);
        sb.append(", idType=").append(idType);
        sb.append(", idNum=").append(idNum);
        sb.append(", halfPhoto=").append(halfPhoto);
        sb.append(", identityPhotosFornt=").append(identityPhotosFornt);
        sb.append(", identityPhotosRear=").append(identityPhotosRear);
        sb.append(", identityPhotosHold=").append(identityPhotosHold);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}